package com.bootdo.imgtext.check.impl;

import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

import com.bootdo.imgtext.check.CheckService;

public class XinhuaImpl extends CheckService {

	public XinhuaImpl(String url) {
		
		Document doc = getDoc(url);

		Element content = null;
		if (doc != null) {
			content = doc.select("div#content").first();
		} else {
			return;
		}
		if (content == null) {
			return;
		}
		
		Element zuozhe = content.select("span.zuozhe").first();
		if (zuozhe != null) {
			author = zuozhe.text().trim();
		}
		
		Elements imgs = content.select("img[src]");
		checkImgs(imgs);
	}


}
